package com.zhiyou100.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zhiyou100.IService.IProService;
import com.zhiyou100.entity.prosGo.TbProjects;
import com.zhiyou100.entity.prosGo.TbProjectsExample;
import com.zhiyou100.entity.prosGo.TbProjectsExample.Criteria;
import com.zhiyou100.mapper.prosGo.TbProjectsMapper;


@Service
public class ProService implements IProService{

	@Resource
	private TbProjectsMapper mapper;
	public List<TbProjects> queryByType(Integer ps_id) {
		if(ps_id!=0) {
			TbProjectsExample example = new TbProjectsExample();
			Criteria criteria = example.createCriteria();
			criteria.andPsPstIdEqualTo(ps_id);
			return mapper.selectByExample(example);
		}else {
			return mapper.selectByExample(null);
		}
	}
}
